//判断只有项目发布才使用babel-plugin-transform-remove-console插件
const prodPlugins=[]
if(process.env.NODE.ENV === 'production'){
  prodPlugins.push('transform-remove-console')
}

module.exports = {
  "presets": [
    "@vue/cli-plugin-babel/preset"
  ],
  "plugins": [
    [
      "component",
      {
        "libraryName": "element-ui",
        "styleLibraryName": "theme-chalk"
      }
    ],
    //安装使用在这里配置babel-plugin-transform-remove-console插件移除所有conlose后再打包  安装命令：npm install babel-plugin-transform-remove-console --save-dev
    ...prodPlugins,
    '@babel/plugin-syntax-dynamic-import'
  ]
}